package org.csu.spring.demo.ioc.service;

import org.csu.spring.demo.aop.persistence.AccountDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("accountService")
public class AccountService {
    //按类型搜索
    //@Autowired
    //按名称搜索
    @Resource(name="accountDAO")
    private AccountDao accountDao;


    public void login(){
        System.out.println("SloginFANGFA");
        accountDao.find();
    }

    public void did(){
        System.out.println("x");
    }

    public AccountDao getAccountDao() {
        return accountDao;
    }

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }
}